// JavaScript Document
window.onload=function(){
var li=document.getElementsByTagName("h2");
var btn=document.getElementsByClassName("btn");
for(var i=0;i<li.length;i++)
  {
	li[i].onclick=function(){
		var u=this.parentElement.getElementsByTagName("ul")[0];
		if(u!=undefined){
				u.style.display="block";
				//console.log("a");
				
		}
	}
  }
for(var i=0;i<li.length;i++)
{  
   btn[i].onclick=function(){
   this.parentElement.style.display="none";
		         console.log("b");
	        }
}
 /*var btn1=document.getElementById("btn1");
 btn1.onclick=function(){
	 var a=this.parentElement;
	 var photo=a.getElementsByTagName("img");
	 if(btn1.getAttribute("class")!="color"){
		 btn1.setAttribute("class","color")
	 }
	 else{
	 btn1.setAttribute("class","btn2");
	 }
 }*/
 
}
